﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.OpenGL;
using Silvermoon.Controls;

namespace Silvermoon.Windows.Styles
{
    public class LabelStyle : Style
    {
        public FontSprite Font { get; set; }
        public bool? AutoSize { get; set; }
        public Alignment? Alignment { get; set; }
        public Alignment? LineAlignment { get; set; }
        public LineMode? LineMode { get; set; }
        public bool? IsShadowed { get; set; }
        public float? FontScale { get; set; }

        public override void Apply(Control c)
        {
            Label l = c as Label;
            if (Font != null) l.Font = Font;
            if (AutoSize.HasValue) l.AutoSize = AutoSize.Value;
            if (Alignment.HasValue) l.Alignment = Alignment.Value;
            if (LineAlignment.HasValue) l.LineAlignment = LineAlignment.Value;
            if (LineMode.HasValue) l.LineMode = LineMode.Value;
            if (IsShadowed.HasValue) l.IsShadowed = IsShadowed.Value;
            if (FontScale.HasValue) l.FontScale = FontScale.Value;
            base.Apply(c);
        }
    }
}
